package com.handpay.zztong.hp.qualification.model;

import android.os.Parcel;

import com.handpay.zztong.hp.bean.ResponseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * @author sxshi on 2017/3/14.
 *         email:emotiona_xiaoshi@126.com
 *         describe:Describe the function  of the current class
 */

public class BankAreaBean extends ResponseBean {

    /**
     * items : 1
     * list : [{"areaName":"上海","areaId":"263"}]
     */

    private int items;
    private List<ListBean> list;

    public int getItems() {
        return items;
    }

    public void setItems(int items) {
        this.items = items;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements android.os.Parcelable {
        /**
         * areaName : 上海
         * areaId : 263
         */

        private String areaName;
        private String areaId;

        public String getAreaName() {
            return areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public String getAreaId() {
            return areaId;
        }

        public void setAreaId(String areaId) {
            this.areaId = areaId;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.areaName);
            dest.writeString(this.areaId);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.areaName = in.readString();
            this.areaId = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public String toString() {
        return "BankAreaBean{" + "items=" + items + ", list=" + list + '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeInt(this.items);
        dest.writeList(this.list);
    }

    public BankAreaBean() {
    }

    protected BankAreaBean(Parcel in) {
        super(in);
        this.items = in.readInt();
        this.list = new ArrayList<ListBean>();
        in.readList(this.list, ListBean.class.getClassLoader());
    }

    public static final Creator<BankAreaBean> CREATOR = new Creator<BankAreaBean>() {
        @Override
        public BankAreaBean createFromParcel(Parcel source) {
            return new BankAreaBean(source);
        }

        @Override
        public BankAreaBean[] newArray(int size) {
            return new BankAreaBean[size];
        }
    };
}
